package Server;

/*
 * File:    VallaPrincipal.java
 * Coms:    Esta clase construye el JFrame y el Container.
 * Construye y lanza 1 Thread de VallaPrincipalLabel    
 * 		   
 */

/**
 * @author Daniel Cabrera Ebana - 686013
 * @author Alberto Sanchez Romero - 662385
 * @since 
 */

import java.awt.Container;
import java.awt.GridLayout;
import java.awt.Image;
import java.io.File;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.border.Border;
import javax.swing.border.LineBorder;

public class VallaPrincipal implements Runnable {

	static File directorio;
	static JFrame frame;
	static Container content;
	static JLabel label1;
	GestorRecursos gestor;
	Thread label;

	/**
	 * Constructor de la valla principal
	 * 
	 * @param File
	 * @param GestorRecursos
	 * @see GestorRersos.java
	 */
	public VallaPrincipal(File directorio, GestorRecursos gr) {
		VallaPrincipal.directorio = directorio;
		this.gestor = gr;

		frame = new JFrame("VALLA PRINCIPAL");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		content = frame.getContentPane();
		content.setLayout(new GridLayout(1, 1));

		label = new Thread(new VallaPrincipalLabel(gestor, directorio, frame,
				content));

		frame.setSize(600, 600);
		frame.setVisible(true);
		frame.setResizable(false);

	}

	public void run() {

		label.start();

	}

}
